Kanzi 3.9.10
kanzi::InputManipulator::Collection Struct Reference

Common functions of collections of attached InputManipulators processing a specific input event type. More...

#include <kanzi/core.ui/input/input_manipulator.hpp>

Public Types

using NotifierFunc
 Notifier functor type.
 
enum class  ProcessingResult { Continue , StopRouting , Abort }
 Input processing result. More...
 

Public Member Functions

void add (InputManipulator *inputManipulator)
 Adds a manipulator to the collection.
 
void cancelAllActiveManipulators ()
 Cancels all manipulators in the collection.
 
void cancelAllActiveManipulators (const OverlayScope &overlay)
 Cancels the input manipulators that are attached to child nodes of the overlay focus scope.
 
void cancelAllKeyInputManipulators (const OverlayScope &overlay)
 In the collection of key input manipulators, cancels those that are attached to child nodes of the overlay focus scope.
 
void cancelAllManipulatorsInSubtree (const Node &root)
 Cancels all active cancelable manipulators for the root node and its descendant nodes in the same overlay scope.
 
void cancelIncompatibleManipulators (InputManipulator *inputManipulator)
 Cancels all manipulators in the collection, except the one that you pass to the function.
 
void clearCanceledStatus ()
 Clears the handled status of all attached input manipulators that are in the Canceled state.
 
void clearCanceledStatus (const OverlayScope &overlay)
 Clears the handled status of the input manipulators in the collection, which are attached to child nodes of the overlay focus scope and are in Canceled state.
 
void clearStatus ()
 Clears handled status of all attached input manipulators.
 
void clearStatus (const OverlayScope &overlay)
 Clears the handled status of the input manipulators in the collection, which are attached to child nodes of the overlay focus scope.
 
 Collection (InputManager &inputManager)
 Collection constructor.
 
void compact ()
 Erases all null-manipulator elements from the collection.
 
InputManagergetInputManager () const
 Returns the input manager that owns the collection.
 
bool hasInvalid () const
 Checks whether there are invalid attached manipulators.
 
bool isAllowed (InputManipulator *inputManipulator)
 Checks whether the manipulator that you pass to the function is allowed.
 
bool isEmpty () const
 Returns whether the collection is empty.
 
bool isLocked () const
 Returns whether the collection is locked against changes not performed during event processing.
 
void lock ()
 Locks the collection to guard it from external changes.
 
void markTouchPointHandled (unsigned int touchId)
 Marks the touch point with passed touchId handled.
 
EventQueue::ProcessingResult processEvent (InputEvent &event, Node2D &rootNode)
 Processes an input event.
 
void purgeTouchPoints ()
 Removes from the touch point cache all touch points that are in the "up" state.
 
void remove (InputManipulator *inputManipulator)
 Removes a manipulator from the collection.
 
void removeAllManipulators ()
 Removes all manipulators from the collection.
 
void removeCanceledManipulators ()
 Removes the canceled manipulators from the collection.
 
void removeIncompatibleManipulators (InputManipulator *inputManipulator)
 Removes all manipulators from the collection, except the one that you pass to the function.
 
void unlock ()
 Unlocks a previously locked collection.
 
ProcessingResult updateManipulator (InputManipulator *inputManipulator, const NotifierFunc &notifier)
 Updates the inputManipulator calling the notifier function on it.
 

Detailed Description

Common functions of collections of attached InputManipulators processing a specific input event type.

Since
Kanzi 3.9.0 moved from InputManager to InputManipulator.

Member Typedef Documentation

◆ NotifierFunc

Member Enumeration Documentation

◆ ProcessingResult

Input processing result.

The result is returned by the notifier functions and drives the input propagation in the hit test, or the focus node tree.

Enumerator
Continue 

Continue input processing.

StopRouting 

Stop routing the input to nodes in the node tree, but continue notifying the input manipulators in the current node.

Abort 

Abort input processing.

Constructor & Destructor Documentation

◆ Collection()

kanzi::InputManipulator::Collection::Collection ( InputManager & inputManager)
inlineexplicit

Collection constructor.

Member Function Documentation

◆ getInputManager()

InputManager * kanzi::InputManipulator::Collection::getInputManager ( ) const
inline

Returns the input manager that owns the collection.

Returns
The input manager that owns the collection.

◆ isEmpty()

bool kanzi::InputManipulator::Collection::isEmpty ( ) const
inline

Returns whether the collection is empty.

Returns
If the collection is empty, true, otherwise false.

◆ add()

void kanzi::InputManipulator::Collection::add ( InputManipulator * inputManipulator)

Adds a manipulator to the collection.

Parameters
inputManipulatorThe manipulator that you want to add to the collection.

◆ remove()

void kanzi::InputManipulator::Collection::remove ( InputManipulator * inputManipulator)

Removes a manipulator from the collection.

Parameters
inputManipulatorThe manipulator that you want to remove from the collection.

◆ removeIncompatibleManipulators()

void kanzi::InputManipulator::Collection::removeIncompatibleManipulators ( InputManipulator * inputManipulator)

Removes all manipulators from the collection, except the one that you pass to the function.

Parameters
inputManipulatorThe manipulator that you want to keep in the collection.

◆ removeCanceledManipulators()

void kanzi::InputManipulator::Collection::removeCanceledManipulators ( )

Removes the canceled manipulators from the collection.

◆ removeAllManipulators()

void kanzi::InputManipulator::Collection::removeAllManipulators ( )

Removes all manipulators from the collection.

◆ cancelIncompatibleManipulators()

void kanzi::InputManipulator::Collection::cancelIncompatibleManipulators ( InputManipulator * inputManipulator)

Cancels all manipulators in the collection, except the one that you pass to the function.

Parameters
inputManipulatorThe manipulator that you do not want to cancel.

◆ cancelAllActiveManipulators() [1/2]

void kanzi::InputManipulator::Collection::cancelAllActiveManipulators ( )

Cancels all manipulators in the collection.

◆ cancelAllKeyInputManipulators()

void kanzi::InputManipulator::Collection::cancelAllKeyInputManipulators ( const OverlayScope & overlay)

In the collection of key input manipulators, cancels those that are attached to child nodes of the overlay focus scope.

Parameters
overlayThe overlay focus scope for which to cancel the input manipulators.
Since
Kanzi 3.9.6

◆ cancelAllActiveManipulators() [2/2]

void kanzi::InputManipulator::Collection::cancelAllActiveManipulators ( const OverlayScope & overlay)

Cancels the input manipulators that are attached to child nodes of the overlay focus scope.

Parameters
overlayThe overlay focus scope for which to cancel the input manipulators.
Since
Kanzi 3.9.2

◆ cancelAllManipulatorsInSubtree()

void kanzi::InputManipulator::Collection::cancelAllManipulatorsInSubtree ( const Node & root)

Cancels all active cancelable manipulators for the root node and its descendant nodes in the same overlay scope.

Parameters
rootThe root node of the subtree in which to cancel the manipulators.
Since
Kanzi 3.9.0

◆ compact()

void kanzi::InputManipulator::Collection::compact ( )

Erases all null-manipulator elements from the collection.

◆ hasInvalid()

bool kanzi::InputManipulator::Collection::hasInvalid ( ) const

Checks whether there are invalid attached manipulators.

Returns
If the collection contains invalid attached manipulators, true, otherwise false.

◆ clearStatus() [1/2]

void kanzi::InputManipulator::Collection::clearStatus ( )

Clears handled status of all attached input manipulators.

◆ clearStatus() [2/2]

void kanzi::InputManipulator::Collection::clearStatus ( const OverlayScope & overlay)

Clears the handled status of the input manipulators in the collection, which are attached to child nodes of the overlay focus scope.

Parameters
overlayThe overlay focus scope for which to cancel the input manipulators.
Since
Kanzi 3.9.2

◆ clearCanceledStatus() [1/2]

void kanzi::InputManipulator::Collection::clearCanceledStatus ( )

Clears the handled status of all attached input manipulators that are in the Canceled state.

Since
Kanzi 3.9.3

◆ clearCanceledStatus() [2/2]

void kanzi::InputManipulator::Collection::clearCanceledStatus ( const OverlayScope & overlay)

Clears the handled status of the input manipulators in the collection, which are attached to child nodes of the overlay focus scope and are in Canceled state.

Parameters
overlayThe overlay focus scope for which to cancel the input manipulators.
Since
Kanzi 3.9.3

◆ isAllowed()

bool kanzi::InputManipulator::Collection::isAllowed ( InputManipulator * inputManipulator)

Checks whether the manipulator that you pass to the function is allowed.

Parameters
inputManipulatorThe manipulator for which you want to check whether it is allowed.

◆ updateManipulator()

ProcessingResult kanzi::InputManipulator::Collection::updateManipulator ( InputManipulator * inputManipulator,
const NotifierFunc & notifier )

Updates the inputManipulator calling the notifier function on it.

◆ purgeTouchPoints()

void kanzi::InputManipulator::Collection::purgeTouchPoints ( )

Removes from the touch point cache all touch points that are in the "up" state.

◆ processEvent()

EventQueue::ProcessingResult kanzi::InputManipulator::Collection::processEvent ( InputEvent & event,
Node2D & rootNode )

Processes an input event.

Parameters
eventThe input event to process. This is either a touch, a pointer or a key event.
rootNodeThe root node that receives the events that are processed.
Returns
The event queue processing result value.

◆ lock()

void kanzi::InputManipulator::Collection::lock ( )

Locks the collection to guard it from external changes.

◆ unlock()

void kanzi::InputManipulator::Collection::unlock ( )

Unlocks a previously locked collection.

◆ isLocked()

bool kanzi::InputManipulator::Collection::isLocked ( ) const
inline

Returns whether the collection is locked against changes not performed during event processing.

Returns
If the collection is processing an event, returns true, otherwise returns false.

◆ markTouchPointHandled()

void kanzi::InputManipulator::Collection::markTouchPointHandled ( unsigned int touchId)

Marks the touch point with passed touchId handled.

When touch point is marked handled, Kanzi marks the touch event that contains touch point with touchId handled during processing of the touch event.

Parameters
touchIdId of the touch point to mark as handled.

The documentation for this struct was generated from the following file: